import { post } from '@/utils/request'

// 素材分组
export const getMaterialGroupList = (p) => post(`/service-file/sourcegroup/v1/list`, p)
// 添加分组
export const addMaterialGroup = (p) => post(`/service-file/sourcegroup/v1/add`, p)
// 重命名
export const renameGroup = (p) => post(`/service-file/sourcegroup/v1/modify`, p)
// 删除分组
export const delMaterialGroup = (p) => post(`/service-file/sourcegroup/v1/del/${p.id}`, p, 'get')
// 素材列表
export const getMaterialList = (p) => post(`/service-file/source/v1/pageList`, p)
// 添加素材
export const addMaterial = (p) => post(`/service-file/source/v1/add`, p)
// 删除素材
export const delMaterial = (p) => post(`/service-file/source/v1/delBatch`, p)
// 修改素材
export const editMaterial = (p) => post(`/service-file/source/v1/modify`, p, 'get')
// 查询素材
export const searchMaterial = (p) => post(`/service-file/source/v1/view/${p.id}`, p, 'get')
// 移动分组
export const moveGroup = (p) => post(`/service-file/source/v1/modifyBatch`, p)
// 获取当前图片信息
export const getThisImgInfo = p => post(`/service-file/source/v1/view/${p.id}`, p, 'get')
// 修改图片名称以及分组
export const modifyThisImgInfo = p => post(`/service-file/source/v1/modify`, p)
